home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr23 / ct50a.zip / CT50A.DOC < prev   
Text File  |  1993-06-18  |  16KB  |  345 lines

  1. Program:    Cache Test                  Copyright 1993 All Rights Reserved
  2. Version:    5.0 a
  3. Author:     George Spafford
  4. Date:       June 18, 1993
  5.  
  6. PURPOSE:
  7.  
  8. To allow users to objectively test the effectiveness of their disk caching
  9. software.  Cache Test is an independent product and is not supported by
  10. any manufacturer.
  11.  
  12. GROUNDWORK:
  13.  
  14. Cache Test tests drive performance by writing data to a specified, or the
  15. default, drive.  Sequential tests are performed by writing randomly generated
  16. fixed length strings to a DOS Text file.  Each record consists of n number of
  17. identical characters plus a carriage return (ASCII 13) and line feed (ASCII 10).
  18. By default, the program writes 513 byte records.  This translates to 511 bytes
  19. in the record plus the CR and LF.  If we were to imagine 8 character records,
  20. and that ^ is a CR and + is a LF then the data looks like this.
  21.  
  22.         aaaaaaaa^+
  23.         33333333^+
  24.         --------^+
  25.         zzzzzzzz^+
  26.  
  27. The characters that make up the record are randomly generated.  The random
  28. routine is seeded by the timer tick every time it is called to increase the
  29. random selections.  Characters range from ASCII 32 to ASCII 252.
  30.  
  31. Random records are written to the disk using a random access file structure.
  32. Each record consists of randomly generated bytes and two record separator
  33. characters.  As with the sequential file structure, the number of characters
  34. written to the disk is the specified record size - 2 + 2 record separators.
  35. It is very similar to the sequential except that it allows random movement
  36. through the file.
  37.  
  38. You can view any off these files by pushing CONTROL-BREAK during their creation
  39. and then use your favorite disk editor or file viewer.
  40.  
  41. The "DIR Test" consists of Cache Test reading the root directories of either
  42. the specified or default drive and then reading the files in those directories.
  43. It will repeat this process until it reaches the required number of reads.
  44. The more directories you have in your root the better.  To be specific,
  45. it reads the tree and then counts the number of files in each directory.
  46. The value you see it totaling is the number of files + the number of directories
  47. + 1 root directory.  However, it will keep incrementing by looping the test
  48. until the desired number of reads has taken place.  Now, let's say that you
  49. run the default 10,000 record (count) test.  Let's also say that you have a
  50. drive witth 2,500 files and directories - the program will need to loop through
  51. the drive 4 times in order to meet its test requirements.  If you limit the
  52. number of records to 2,500 by using the command switch /N:2500 then it will
  53. only need to read the tree once.
  54.  
  55. Usage:
  56.  
  57.         CT [switches]
  58.  
  59.         MAKE SURE YOU HAVE SPACES BETWEEN THE SWITCHES - IF YOU DO NOT, CT
  60.         WILL NOT BE ABLE TO INTERPRET THE SWITCHES CORRECTLY.
  61.  
  62.         /A              Performs all tests [this is the default if just CT
  63.                         is run].
  64.         /C              Specifies that the /L: log file is to be created and
  65.                         not simply appended to.
  66.         /D              Perform DOS directory services test.
  67.         /D:d            Drive to test.  "d" is the drive letter.
  68.         /L:logto        Specifies the file name or device to log to.
  69.                         "logto" is the name.  By default, data is appended to
  70.                         this.  /C must be specified if you want to create a
  71.                         new file and NOT append.
  72.         /N:nnnn         Specifies how many records to write. "nnnn" is the
  73.                         number.  10,000 is the default.
  74.                         If you are processing a directory test, this is how
  75.                         many directory entry reads that CT will perform.
  76.         /P:pppp         Specifies the number of test passes. "pppp" is the
  77.                         number.  1 is the default.
  78.         /R              Perform random access tests.
  79.         /S              Perform sequential tests.
  80.         /S:sss          Specifies the individual record sizes. "sss" is the
  81.                         record size.  The default is 513 bytes.  Specify the
  82.                         total size that you want a record to be.
  83.                         THE MAXIMUM VALUE FOR THIS IS 16,384.  IF YOU GET A
  84.                         STRING SPACE ERROR, YOU WILL NEED TO MAKE THIS VALUE
  85.                         SMALLER THAN WHAT YOU SET IT AT.  A small hint is
  86.                         to set your sizes = to a factor of your sector size
  87.                         + 1 byte.  My sectors are 512, as are most peoples, and
  88.                         then add 1 = the 513 byte default record size.
  89.         /W              Pause after each screen.
  90.         /X              Exclude screen writes during the testing phase to
  91.                         remove the video bottlenecks.
  92.  
  93.         Use /A to run all tests.  /D /R /S specify individual tests.
  94.  
  95.         Examples:
  96.  
  97.         CT /N:1000 /P:5 /W      1000 record test, 5 passes, wait after each
  98.                                 screen completes.
  99.  
  100.         CT /N:5000 /S:1025      5000 record test, 1025 byte records.
  101.  
  102.         CT /N:5000 /W /R /D     5000 record test, wait after each screen,
  103.                                 perform only the random and directory tests.
  104.  
  105.         CT /L:PRN               Perform the default test one time and log it
  106.                                 the printer.
  107.  
  108.  
  109. THE DISPLAY:
  110.  
  111. Please note that the total time values will not add up to the displayed
  112. individual test times.  This is because I have used double-precision floating
  113. point variables to hold my timer values.  While you see only two decimal
  114. places on the screen, there are a bunch that you do not see.  The total values
  115. are the result of the summation of the individual test scores, the totals are
  116. not timed results - they are mathematical results subject to errors in rounding.
  117.  
  118. Also, the averages column is calculated by adding the floating point numbers
  119. together and then dividing by the current pass number - NOT the total number
  120. of passes.
  121.  
  122. STOPPING THE PROGRAM:
  123.  
  124. CONTROL-BREAK will terminate the program execution safely.  Note, you will
  125. probably leave a file named ##TEST##.CT in the root directory of the drive
  126. that you were testing.  You will need to delete that by hand OR CT will delete
  127. it the next time it is run.
  128.  
  129. HISTORY:
  130.  
  131.       v5.0a 06/18/93
  132.   
  133.             The directory test bombed on drives with over 250 directories
  134.             on them.  The program will now process 500 entries before looping.
  135.             This means that if you have 1000 directories, the program will
  136.             only actually use 500 of them to perform its tests.
  137.  
  138.             Also, the program checked for disk space before it performed the
  139.             directory tests - this is not necessary and now space is only
  140.             checked before the sequential and random tests are performed.
  141.  
  142.       v5.0  06/08/93
  143.       
  144.             Can you say "Major Revision?"  This version was rebuilt from the
  145.             ground up and shares very little with previous versions.
  146.             Some of the modifications in this program are a direct result from
  147.             input by Herb Chong.  If it wasn't for Herb's input, the DIR test
  148.             wouldn't be here and test data wouldn't be randomly generated.
  149.             Thank you very much Herb.
  150.  
  151.             A lot of the command line switches have changed.  You may need
  152.             to invoke CT with the /? to see the new ones.
  153.  
  154.             Things that are new:
  155.                 -       Changed switches
  156.                 -       Changed tests
  157.                 -       Changed reporting
  158.                 -       Changed compiler
  159.                 -       Changed my office!
  160.  
  161.       v4.3c 07/09/92 pm
  162.  
  163.             Heck ... I can't win for losing.  I have spent several hours now
  164.             debugging the variable overflow problem.  I believe that they
  165.             have all been eliminated now.
  166.  
  167.             To say "sorry," you can have VT 1.1 also if you choose to register
  168.             (or are already registered to) Cache Test - this just applies to
  169.             people registering 4.3 or who are already registered now.
  170.             
  171.  
  172.       v4.3b 07/09/92 am
  173.       
  174.             Ooops, I switched to explicit variable typing and ran
  175.             into a problem when file sizes exceeded the limit of an
  176.             integer variable (32,767) and the program bombed.  It's all
  177.             set now.      
  178.  
  179.       v4.3  07/06/92
  180.  
  181.             All screens can now be logged to a file or device.  This
  182.             logging no longer requires that the pass count (/P:) be
  183.             greater than 1.
  184.             Every second data screen (excluding the final summary) has
  185.             a form feed added to it to prevent printing across paper
  186.             perforations when logging to a printer.
  187.             The summary screen now displays the command line that was used.
  188.  
  189.          ** Due to the volume of mail that I am receiving, I am forced to
  190.             stop responding to every piece of mail unless you have questions.
  191.             I'm really sorry for that one folks, but it is seriously taking
  192.             time away from me when I could otherwise be coding.
  193.  
  194.       V4.2  01/10/92
  195.   
  196.             Using the /L: switch, a user can now specify where he/she
  197.             would like the summary screen to go (nice idea Jim).
  198.             Also did a little house cleaning on the program in general.
  199.             Happy New Year everyone.  I would like to thank three people
  200.             especially for all of their tolerance and helpful suggestions:
  201.             Tim Aright of Queued Access, Wayne Keeter of Wayne's World,
  202.             and Jonathan Fisk.
  203.  
  204.       V4.1  11/13/91
  205.   
  206.             Well Owen, I thought about it.  The screen counters can
  207.             now be disabled using the /X switch on the command line.
  208.             Note, there are many variables that affect cache performance.
  209.             It was never my intention to test cache performance across
  210.             machines.  BUT, it is a good idea to allow the user the
  211.             ability to decide for his/her self as to whether they want
  212.             to or not.  If you disable the counters, there can be some
  213.             long pauses - especially for the Random Read/Write test - so
  214.             be patient.  CT now has the extremes - a lot of counters or
  215.             none at all ;-)
  216.  
  217.       V4.0  10/29/91
  218.   
  219.             Whew... This one has quite a few updates:
  220.  
  221.             1.  COLOR (makes things a lot easier to read).
  222.             2.  Tracking of timer ticks has been tightened down.
  223.             3.  Created the ability to perform a number of tests
  224.                 and then present a summary screen with averages
  225.                 using the /P:ppp switch.
  226.             4.  /W switch added for pausing after screens.
  227.  
  228.  
  229.       V3.5  9/03/91
  230.  
  231.             In response to Mike Focke's request for counters in the
  232.             crescendo and butterfly tests, I have again enabled them.
  233.             And Mike, thanks for the suggestions ;-)
  234.  
  235.       V3.1  8/26/91
  236.  
  237.             The timing routine is now based on the presence of 18.2
  238.             clock ticks per one second.  The 100ths decimal location is
  239.             still weak, but improved.
  240.  
  241.       V3.0  7/10/91
  242.  
  243.             Well, I accessed the BIOS segment for clock ticks to create
  244.             the decimal level counters.  The second decimal place is
  245.             weak in terms of its accuracy, but I decided to leave it in.
  246.             For those of you worried about significant digits, the 
  247.             algorithm used for this uses 18 clock ticks to generate one
  248.             second of time.
  249.  
  250.             The test records are now 32 bytes total.
  251.  
  252.             Output screen formatting is improved.
  253.  
  254.             If the program is invoked without any parameters, it executes
  255.             on the active drive with a 10,000 record test made up of 32
  256.             bytes.  All user input now occurs on the command line through
  257.             the use of switches.          
  258.  
  259.       V2.6  5/24/91
  260.  
  261.             I honestly did not intend another update so soon.  It was
  262.             pointed out to me that the file structure that I had been
  263.             using was variable.  As such, it made ratio comparisons
  264.             somewhat difficult.  Now, the default fixed record length
  265.             is 32 bytes (the test record count is still 10,000).  The
  266.             user can specify the record length by using the /F:bbbbb
  267.             switch.  "bbbbb" must be between 0 and 32,765.   Since the
  268.             values are now fixed, a user can do a little math (remember
  269.             that subject folks??) and discern the records per second and
  270.             so forth.  Do note, that two bytes are added to the test string
  271.             in the files (CR/LF to be exact) that is why the maximum byte
  272.             size that a user can specify is 32,765 and not the 32,767 legal
  273.             default limit.
  274.               
  275.       V2.5  5/22/91
  276.  
  277.             1.  An actual test file byte size field has been added.
  278.                 This should allow users to track the actual sizes of
  279.                 the test records being written.
  280.             2.  Some users suggested that truly random reads and writes
  281.                 should be added.  This serves to get away from any form
  282.                 of sequentialized data.
  283.             3.  Again, more cosmetic touchups.
  284.  
  285.       V2.0  5/16/91
  286.  
  287.             Due to some users having limited drive space, switches
  288.             were added to allow for different size tests to 
  289.             occur.  I was somewhat hesitant to do this because it
  290.             negated the ability to call results "standard," but 
  291.             what really is standard?
  292.  
  293.             Switches were also added to allow users to select 
  294.             what tests they want to run.  For now, all that can 
  295.             be specified is whether or not to run all tests, 
  296.             sequential tests only, or random tests only.
  297.  
  298.             The ButterFly test was also added in an attempt to 
  299.             give look-ahead caches a hard time.  Some of the 
  300.             caches that use a FIFO method of purging will have a 
  301.             heck of a time with this one.
  302.  
  303.             Added timers/cleared up timers for the sequential and 
  304.             overall tests.  Also speaking of timers, to avoid 
  305.             slowing down some routines, I have removed some of 
  306.             the video effects that were for the user's benefit 
  307.             only.
  308.  
  309.             Special thanks to Jonathan Fisk for all of his 
  310.             suggestions and debugging efforts.
  311.  
  312.             Special thanks also go out to Tim Akright, the sysop 
  313.             of Queued Access for all of his support.
  314.  
  315.  
  316.       V1.0  5/10/91
  317.  
  318.             Well, I released it.  That pretty well sums it up.
  319.  
  320.  
  321.         I hope this program helps you evaluate some of your problems
  322.         or even makes some solutions/benefits clear.  This program is
  323.         released as shareware.  Its price is $10 for each concurrently
  324.         used copy.
  325.  
  326.                 Sincerely,
  327.  
  328.                 George Spafford
  329.                 3003 LakeShore Drive, #216
  330.                 St. Joseph, MI 49085
  331.  
  332.         I can be reached via a modem on EXEC-PC or CHANNEL-ONE BBS.
  333.         My local BBS is Michigan Online 19200-8-N-1 (616) 429-3414
  334.         Sysop:  Zeke Torres.
  335.  
  336.         Code CopyRight:  1993 - George Spafford All Rights Reserved.
  337.         
  338.         CACHE TEST IS DISTRIBUTED AS IS.  THE AUTHOR (GEORGE SPAFFORD) MAKES NO
  339.         WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  340.         TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
  341.         WITH RESPECT TO THIS SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL
  342.         THE AUTHOR BE LIABLE FOR ANY DAMAGES, INCLUDING LOST PROFITS, LOST
  343.         SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  344.         OUT OF THE USE OF OR THE INABILITY TO USE THIS PROGRAM.
  345.